<div class="appList" ng-app="appVersion" ng-controller="appVersionCtrl">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-comments"></i>版本列表
        </div>
        <div class="tools">
            <a href="javascript:;" class="collapse">
            </a>
            <a href="#portlet-config" data-toggle="modal" class="config">
            </a>
            <a href="javascript:;" class="reload">
            </a>
            <a href="javascript:;" class="remove">
            </a>
        </div>
    </div>
    <div class="portlet-body">
        <div class="table-scrollable">
            <div id="query_app_version_div">
                <table class="table table-striped table-hover">
                    <tr>
                        <th>版本ID</th>
                        <th>版本号</th>
                        <th>下载地址</th>
                        <th>强制更新</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    <tbody>
                    <tr ng-repeat="appVersion in appVersionList">
                        <td>{{appVersion.id}}</td>
                        <td>{{appVersion.version}}</td>
                        <td><a href="{{appVersion.fileUri}}" title="{{appVersion.fileUri}}">{{appVersion.fileUri}}</a>
                        </td>
                        <td>{{transformBool(appVersion.forceUpdate)}}</td>
                        <td>{{transformAppStatus(appVersion.status)}}</td>
                        <td><a ui-sref="detectLogDetail({id:record.id})">详情</a></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <a href="javascript:;" ng-click="showUpdate()">新增</a>&nbsp;
</div>
<div id="update_div" style="display: none;text-align: center">
    <form id="update_form" class="form-horizontal" target="update_from_target" method="post"
          Enctype="multipart/form-data">
        <input class="update_field text" name="id" ng-model="appVersion.id" style="display: none">

        <div class="form-group">
            <label class="control-label col-md-2">版本号</label>

            <div class="col-md-10">
                <input class="update_field form-control" name="version"
                       ng-model="appVersion.version">&nbsp;</div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-2">强制更新</label>

            <div class="col-md-1">
                <select class="update_field form-control" name="forceUpdate"
                        ng-model="appVersion.forceUpdate">
                    <option value="false">否</option>
                    <option value="true">是</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-2">状态</label>

            <div class="col-md-1">
                <select class="update_field form-control" name="status"
                        ng-model="appVersion.status">
                    <option value="1">上线</option>
                    <option value="0">下线</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-2">更新信息</label>

            <div class="col-md-10">
                <input class="update_field form-control" name="info" ng-model="appVersion.info">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-2">版本文件</label>

            <div class="col-md-10">
                <input class="update_field form-control" name="file" type="file">
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-12">
                <a href="javascript:;" ng-click="saveUpdate()">保存</a>
                <a href="javascript:;" ng-click="hideUpdate()">取消</a>
            </div>
        </div>
    </form>
    <div style="display: none">
        <iframe id="update_from_target" name="update_from_target"></iframe>
    </div>
</div>
</div>